﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace XMLManager
{
    public class XMLM
    {
        private List<String[]> _Avatars = new List<string[]>();
        public List<String[]> Avatars
        {
            get { return _Avatars; }
            set { _Avatars = value; }
        }

        private string _XMLPath = string.Empty;
        private XmlTextReader xmlr;

        public XMLM(String XMLPath) 
        { 
            _XMLPath = XMLPath;
            xmlr = new XmlTextReader(_XMLPath);// XmlReader.Create(_XMLPath);
            this.Read();
            //XmlTextWriter xmlw = new XmlTextWriter(
        }

        public void Read()
        {
            while (xmlr.Read())
            {
                if (xmlr.NodeType == XmlNodeType.Element)
                {
                    string a = "";
                    Avatar av = new Avatar(
                }
            }
        }

        public struct Avatar
        {
            private string _name;
            public string name
            {
                get { return _name; }
                set { _name = value; }
            }

            private string _main;
            public string main
            {
                get { return _main; }
                set { _main = value; }
            }

            private string _sub;
            public string sub
            {
                get { return _sub; }
                set { _sub = value; }
            }

            private string _ranged;
            public string ranged
            {
                get { return _ranged; }
                set { _ranged = value; }
            }

            private string _ammo;
            public string ammo
            {
                get { return _ammo; }
                set { _ammo = value; }
            }

            private string _head;
            public string head
            {
                get { return _head; }
                set { _head = value; }
            }

            private string _neck;
            public string neck
            {
                get { return _neck; }
                set { _neck = value; }
            }

            private string _ear1;
            public string ear1
            {
                get { return _ear1; }
                set { _ear1 = value; }
            }

            private string _ear2;
            public string ear2
            {
                get { return _ear2; }
                set { _ear2 = value; }
            }

            private string _body;
            public string body
            {
                get { return _body; }
                set { _body = value; }
            }

            private string _hands;
            public string hands
            {
                get { return _hands; }
                set { _hands = value; }
            }

            private string _lring;
            public string lring
            {
                get { return _lring; }
                set { _lring = value; }
            }

            private string _rring;
            public string rring
            {
                get { return _rring; }
                set { _rring = value; }
            }

            private string _back;
            public string back
            {
                get { return _back; }
                set { _back = value; }
            }

            private string _waist;
            public string waist
            {
                get { return _waist; }
                set { _waist = value; }
            }

            private string _legs;
            public string legs
            {
                get { return _legs; }
                set { _legs = value; }
            }

            private string _feet;
            public string feet
            {
                get { return _feet; }
                set { _feet = value; }
            }

            public Avatar(String name,
                String main,
                String sub,
                String ranged,
                String ammo,
                String head,
                String neck,
                String ear1,
                String ear2,
                String body,
                String hands, 
                String lring, 
                String rring, 
                String back, 
                String waist, 
                String legs, 
                String feet)
            {
                _name = name;
                _main = main;
                _sub = sub;
                _ranged = ranged;
                _ammo = ammo;
                _head = head;
                _neck = neck;
                _ear1 = ear1;
                _ear2 = ear2;
                _body = body;
                _hands = hands;
                _lring = lring;
                _rring = rring;
                _back = back;
                _waist = waist;
                _legs = legs;
                _feet = feet;
            }
        }
    }
}
